import Layout from "@/layout";
import levels from "@/views/levels";

const distributionRouter = {
  path: "/distribution/orderprint",
  component: Layout,
  redirect: "noRedirect",
  name: "distribution",
  alwaysShow: true,
  hidden: false,
  meta: {
    title: "配送管理",
    abbre: "配送",
    icon: "left_menu_distribution",
    navigation: "/distribution",
    id: "407"
  },
  children: [
    {
      path: "/distribution/orderprint",
      component: () => import("@/views/distribution/distributionOrderPrint"),
      name: "distribution_order_print",
      hidden: false,
      meta: {
        title: "配送单打印",
        noCache: false,
        navigation: "/distribution/orderprint",
        icon: "menu_big_data"
      }
    },
    {
      path: "/distribution/line/survey",
      component: levels,
      name: "distribution_lineplan",
      hidden: false,
      meta: {
        title: "线路规划",
        noCache: true,
        navigation: "/distribution/line/survey",
        icon: "menu_big_data"
      },
      children: [
        {
          path: "/distribution/line/survey",
          component: () =>
            import("@/views/distribution/linePlan/linesSurvey.vue"),
          name: "distribution_lineplan_survey",
          hidden: true,
          meta: {
            title: "线路概况",
            noCache: true,
            navigation: "/distribution/line/survey",
            icon: "menu_big_data"
          }
        },
        {
          path: "/distribution/line/smartwrite",
          component: () =>
            import("@/views/distribution/linePlan/lineSmartWrite.vue"),
          name: "distribution_lineplan_smartwrite",
          hidden: true,
          meta: {
            title: "智能排线",
            noCache: true,
            navigation: "/distribution/line/survey",
            icon: "menu_big_data"
          }
        },
        {
          path: "/distribution/line/powerWeight",
          component: () =>
            import("@/views/distribution/linePlan/linePowerWeight.vue"),
          name: "distribution_lineplan_powerWeight",
          hidden: true,
          meta: {
            title: "权重设置",
            noCache: true,
            navigation: "/distribution/line/survey",
            icon: "menu_big_data"
          }
        },
        {
          path: "/distribution/line/history",
          component: () =>
            import("@/views/distribution/linePlan/lineHistory.vue"),
          name: "distribution_lineplan_history",
          hidden: true,
          meta: {
            title: "历史排线",
            noCache: true,
            navigation: "/distribution/line/survey",
            icon: "menu_big_data"
          }
        },
        {
          path: "/distribution/line/history/see/:id",
          component: () =>
            import("@/views/distribution/linePlan/lineHistory_see.vue"),
          hidden: true,

          name: "distribution_lineplan_history_see",
          meta: {
            title: "查看",
            bread: "查看",
            noCache: true,
            navigation: "/distribution/line/survey",
            icon: "menu_big_data",
            treeMenuHidden: true
          }
        }
      ]
    },
    {
      path: "/distribution/volume/order",
      component: levels,
      name: "distribution_volume",
      hidden: false,
      meta: {
        title: "体积重量",
        noCache: true,
        navigation: "/distribution/volume/order",
        icon: "menu_big_data"
      },
      children: [
        {
          path: "/distribution/volume/order",
          component: () =>
            import("@/views/distribution/distributionVolume_order"),
          name: "distribution_volume_order",
          hidden: true,
          meta: {
            title: "订单商品",
            noCache: true,
            navigation: "/distribution/volume/order",
            icon: "menu_big_data"
          }
        },
        {
          path: "/distribution/volume/commodity",
          component: () =>
            import("@/views/distribution/distributionVolume_commodity"),
          name: "distribution_volume_commodity",
          hidden: true,
          meta: {
            title: "所有商品",
            noCache: true,
            navigation: "/distribution/volume/order",
            icon: "menu_big_data"
          }
        }
      ]
    },
    {
      path: "/distribution/line",
      component: () => import("@/views/distribution/distributionLine"),
      name: "distribution_line",
      hidden: false,
      meta: {
        title: "线路管理",
        noCache: true,
        navigation: "/distribution/line",
        icon: "menu_big_data"
      }
    },
    {
      path: "/distribution/driver",
      component: () => import("@/views/distribution/distributionDriver"),
      name: "distribution_driver",
      hidden: false,
      meta: {
        title: "司机管理",
        noCache: true,
        navigation: "/distribution/driver",
        icon: "menu_big_data"
      }
    },
    {
      path: "/distribution/vehicle",
      component: () => import("@/views/distribution/distributionVehicle"),
      name: "distribution_vehicle",
      hidden: false,
      meta: {
        title: "车辆列表",
        noCache: true,
        navigation: "/distribution/vehicle",
        icon: "menu_big_data"
      }
    },
    {
      path: "/distribution/capacity",
      component: () => import("@/views/distribution/distributionCapacity"),
      name: "distribution_capacity",
      hidden: false,
      meta: {
        title: "运力监测",
        noCache: true,
        navigation: "/distribution/capacity",
        icon: "menu_big_data"
      }
    },
    {
      path: "/user/freight",
      component: () => import("@/views/user/userFreight"),
      name: "user_freight",
      hidden: false,
      meta: {
        title: "运费设置",
        noCache: true,
        navigation: "/user/freight",
        icon: "menu_big_data"
      }
    },
    {
      path: "/user/freight/add",
      component: () => import("@/views/user/userFreight_add"),
      name: "user_freight_add",
      hidden: true,
      meta: {
        title: "新增模板",
        bread: "运费设置,新增模板",
        noCache: true,
        navigation: "/user/freight",
        icon: "menu_big_data"
      }
    },
    {
      path: "/user/freight/edit/:id?",
      component: () => import("@/views/user/userFreight_edit"),
      name: "user_freight_edit",
      hidden: true,
      meta: {
        title: "编辑模板",
        bread: "运费设置,编辑模板",
        noCache: true,
        navigation: "/user/freight",
        icon: "menu_big_data"
      }
    },
    {
      path: "/user/freight/member/:id?",
      component: () => import("@/views/user/userFreight_member"),
      name: "user_freight_member",
      hidden: true,
      meta: {
        title: "用户",
        bread: "运费设置,用户",
        noCache: true,
        navigation: "/user/freight",
        icon: "menu_big_data"
      }
    },
    {
      path: "/distribution/circle",
      component: () => import("@/views/distribution/distributionCircle"),
      name: "distribution_circle",
      hidden: false,
      meta: {
        title: "配送范围",
        noCache: true,
        navigation: "/distribution/circle",
        icon: "menu_big_data"
      }
    },
  ]
};

export default distributionRouter;
